<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组合式API - 单击+1按钮</title>

</head>

<body>
    <script src="https://unpkg.com/vue@3.3.4"></script>
    <div id="Application">
        <button v-on:click="myClick()">单击我</button>
        <p>单击了{{ins}}次</p>
        <h3>VUE3</h3>
    </div>
    <script>
        const App = Vue.createApp({
            setup() {
                let ins = Vue.ref(0)
                function myClick() {
                    ins.value = ins.value + 1
                }
                return { ins, myClick }
            }
        })
        App.mount("#Application")
    </script>
</body>

</html>